dc39e818c6fcf0b3026a053e0716bfc31088db53,src/test/java/org/jfaster/mango/exception/IllegalStateExceptionTest.java,IllegalStateExceptionTest,test3,#,62

Before Change


    thrown.expect(IllegalStateException.class);
    thrown.expectMessage("if use cache, each method expected one or more " +
        "@CacheBy annotation on parameter but found 0");
    Dao3 dao = mango.create(Dao3.class, new LocalCacheHandler());
    dao.add();
  }

After Change


    thrown.expect(IllegalStateException.class);
    thrown.expectMessage("if use cache, each method expected one or more " +
        "@CacheBy annotation on parameter but found 0");
    Mango mango = Mango.newInstance(DataSourceConfig.getDataSource());
    mango.setLazyInit(true);
    mango.setCacheHandler(new LocalCacheHandler());
    Dao3 dao = mango.create(Dao3.class);
    dao.add();
  }